package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ProRepairMoneysMapper;
import com.ruoyi.domain.ProRepairMoneys;
import com.ruoyi.service.IProRepairMoneysService;
import com.ruoyi.common.core.text.Convert;

/**
 * 维修器件金额Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-09
 */
@Service
public class ProRepairMoneysServiceImpl implements IProRepairMoneysService 
{
    @Autowired
    private ProRepairMoneysMapper proRepairMoneysMapper;

    /**
     * 查询维修器件金额
     * 
     * @param pId 维修器件金额ID
     * @return 维修器件金额
     */
    @Override
    public ProRepairMoneys selectProRepairMoneysById(Long pId)
    {
        return proRepairMoneysMapper.selectProRepairMoneysById(pId);
    }

    /**
     * 查询维修器件金额列表
     * 
     * @param proRepairMoneys 维修器件金额
     * @return 维修器件金额
     */
    @Override
    public List<ProRepairMoneys> selectProRepairMoneysList(ProRepairMoneys proRepairMoneys)
    {
        return proRepairMoneysMapper.selectProRepairMoneysList(proRepairMoneys);
    }

    /**
     * 新增维修器件金额
     * 
     * @param proRepairMoneys 维修器件金额
     * @return 结果
     */
    @Override
    public int insertProRepairMoneys(ProRepairMoneys proRepairMoneys)
    {
        return proRepairMoneysMapper.insertProRepairMoneys(proRepairMoneys);
    }

    /**
     * 修改维修器件金额
     * 
     * @param proRepairMoneys 维修器件金额
     * @return 结果
     */
    @Override
    public int updateProRepairMoneys(ProRepairMoneys proRepairMoneys)
    {
        return proRepairMoneysMapper.updateProRepairMoneys(proRepairMoneys);
    }

    /**
     * 删除维修器件金额对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteProRepairMoneysByIds(String ids)
    {
        return proRepairMoneysMapper.deleteProRepairMoneysByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除维修器件金额信息
     * 
     * @param pId 维修器件金额ID
     * @return 结果
     */
    @Override
    public int deleteProRepairMoneysById(Long pId)
    {
        return proRepairMoneysMapper.deleteProRepairMoneysById(pId);
    }

    /**
     * 按Id查询维修器件金额列表
     *
     * @param mPid 维修器件金额id
     * @return 维修器件金额集合
     */
    @Override
    public List<ProRepairMoneys> selectMoneysIdList(Long mPid) {
        return proRepairMoneysMapper.selectMoneysIdList(mPid);
    }
}
